package com.qfedu.service.impl;

import com.qfedu.dao.exercisesDao;
import com.qfedu.entity.Exercises;
import com.qfedu.entity.QuestionCountAndeType;
import com.qfedu.service.exercisesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class exercisesServiceImpl implements exercisesService {
    @Autowired
    private exercisesDao exercisesDao;
    @Override
    public int addExerciser(Exercises exercises) {
        return exercisesDao.addExerciser(exercises);
    }

    @Override
    public List<Exercises> getAllExercises() {
        return exercisesDao.getAllExercises();
    }

    @Override
    public int deleteExercises(int id) {
        return exercisesDao.deleteExerciser(id);
    }

    @Override
    public List<QuestionCountAndeType> getExercisesTypeAndCount() {
        return exercisesDao.getExercisesTypeAndCount();
    }
}
